import { pubRequire } from '@utils/public'
const baseUrl = '/activities'
// 获取列表
export function getSearchList(params, callBack, errBack) {
  return pubRequire(
    'get',
    `${baseUrl}/audit/operate`,
    params,
    callBack,
    errBack
  )
}
// 审核通过请求
export function passRequestAPI(id, callBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl}/${id}/audit/operate/pass`,
    '',
    callBack,
    errBack
  )
}
// 导出地址
export function downUrl(id) {
  return `${baseUrl}/${id}/audit/operate/participant/export`
}
// 审核前预查询
export function getNoticeTypeAPI(id, callBack, errBack) {
  return pubRequire(
    'get',
    `/activities/${id}/audit/published/details`,
    '',
    callBack,
    errBack
  )
}
// 获取运营审核详情
export function getDetailAPI(id, callBack, errBack) {
  return pubRequire(
    'get',
    `${baseUrl}/${id}/audit/operate/crowds`,
    '',
    callBack,
    errBack
  )
}
// 编辑排序
export function editSortAPI(id, params, callBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl}/${id}/audit/operate/sort`,
    params,
    callBack,
    errBack
  )
}
// 审核不通过
export function failRequestAPI(id, params, callBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl}/${id}/audit/operate/unpass`,
    params,
    callBack,
    errBack
  )
}
